home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / resolvconf.config < prev    next >
Encoding:
Text File  |  2010-07-12  |  926 b   |  43 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. . /usr/share/debconf/confmodule
  6.  
  7. adequate_eni()
  8. {
  9.     # Assume that if _any_ dns-nameservers line appears in
  10.     # /etc/network/interfaces then that is adequate and we
  11.     # don't need to ask the user if he wants to link the
  12.     # original file to the dynamic file at medium priority
  13.     grep -q dns-nameservers /etc/network/interfaces > /dev/null
  14. }
  15.  
  16. case $1 in
  17. configure|reconfigure)
  18.     db_input low resolvconf/linkify-resolvconf || :
  19.     db_go || :
  20.     db_get resolvconf/linkify-resolvconf
  21.     if \
  22.         [ "$RET" = "true" ] \
  23.         && [ ! -e /etc/resolvconf/resolv.conf.d/tail ] \
  24.         && [ ! -L /etc/resolvconf/resolv.conf.d/tail ]
  25.     then
  26.         if adequate_eni ; then
  27.             db_input low resolvconf/link-tail-to-original || :
  28.         else
  29.             db_input medium resolvconf/link-tail-to-original || :
  30.         fi
  31.         db_go || :
  32.     else
  33.         db_set resolvconf/link-tail-to-original false
  34.     fi
  35.  
  36.     db_input medium resolvconf/downup-interfaces || :
  37.     db_go || :
  38.     ;;
  39. esac
  40.  
  41. db_stop
  42.  
  43.